<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\widgets\Breadcrumbs;

/* @var $this yii\web\View */
/* @var $model app\models\Manager */
/* @var $form yii\widgets\ActiveForm */

$this->title = '创建管理员';
$this->params['breadcrumbs'][] = ['label' => '设置', 'url' => ['/setting/user/index']];
$this->params['breadcrumbs'][] = ['label' => '管理员信息', 'url' => ['/setting/user']];
$this->params['breadcrumbs'][] = $this->title;
?>

<?= Breadcrumbs::widget([
    'homeLink' => ['label' => '医疗管理系统', 'url' => '#'],
    'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
]) ?>

<div class="manager-form">

    <?php $form = ActiveForm::begin([
        'action' => 'create',
        'fieldConfig' => [
            'template' => "{label}\n<div class=\"col-lg-3\">{input}</div>\n<div class=\"col-lg-7\">{error}</div><br />",
            'labelOptions' => ['class' => 'col-lg-2 control-label'],
        ],
   	]); ?>

    <?= $form->field($model, 'username')->textInput(['maxlength' => true]) ?><br />
    
    <?= $form->field($model, 'password')->textInput(['maxlength' => true]) ?><br />

    <div class="form-group">
        <?= Html::submitButton('保存',['class' => 'btn btn-success']) ?>
        <?= Html::a('取消', ['/setting/user'], ['class' => 'btn btn-success']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
